<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />
    <!-- Sweet Alert -->
    <link href="__PUBLIC__/static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
</head>

<body class="gray-bg top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/sidenav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>查看收藏夹</h5>
                            <div class="ibox-tools">
                                <a href="javascript:;" style="color:dodgerblue;" onclick="window.location.href='{:U('index')}'">
                                    <i class="fa fa-home"></i>返回上一页
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="tabs-container">

                                <div class="tabs-left">
                                    <ul class="nav nav-tabs">
                                        <volist name="collection" id="val" empty="没有找到匹配的记录">
                                            <li <if condition="$i eq 1">class="active" </if> ><a <if condition="$i eq 15">href="{:U('view')}?id={$val.id}" <else/> data-toggle="tab" href="#tab-{$i}" </if>>{$val.name}</a></li>
                                        </volist>
                                    </ul>
                                    <div class="tab-content ">
                                        <volist name="collection" id="val" empty="没有找到匹配的记录">
                                            <div id="tab-{$i}" class="tab-pane <if condition="$i eq 1">active</if>">
                                                <div class="panel-body">
                                                    <strong>{$val.name}</strong>
                                                    <small>创建于：{$val.time|beenTime}</small>
                                                    <if condition="$val['status'] neq 0">
                                                        <a href="javascript:;" class="stu pull-right" val="{$val.id}">
                                                            <i class="fa fa-star-half-o red-bg"></i>
                                                            <i class="fa fa-star-half-o red-bg"></i>
                                                            <i class="fa fa-star-half-o red-bg"></i>
                                                            <i class="fa fa-star-half-o red-bg"></i>
                                                            <i class="fa fa-star-half-o red-bg"></i>
                                                        </a>
                                                        <else />
                                                        <a href="javascript:;" class="stu pull-right" val="{$val.id}">
                                                            <i class="fa fa-star-half-o"></i>
                                                            <i class="fa fa-star-half-o"></i>
                                                            <i class="fa fa-star-half-o"></i>
                                                            <i class="fa fa-star-half-o"></i>
                                                            <i class="fa fa-star-half-o"></i>
                                                        </a>
                                                    </if>
                                                    <hr>
                                                    <div class="alert alert-warning">
                                                        {$val.content}
                                                    </div>

                                                </div>
                                            </div>
                                        </volist>
                                    </div>

                                </div>

                            </div>


                        </div>
                    </div>
                </div>
            </div>
        </div>

        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/sweetalert/sweetalert.min.js"></script>
<script type="text/javascript">
    $(function(){
        //单个标记
        $('.stu').click(function () {
            var id= $(this).attr("val");

            $.post("{:U('stu')}",{id:id},function(data){
                if(data.status !== 'y'){
                    swal('操作失败!', "参数错误原因可能是程序没有获取到参数！", "warning");
                }else{
                    window.location.reload();
                }
            });

        });
    })

</script>
</body>

</html>